<?php

namespace Modules\DataAnalysis\Entities;

use DateTimeInterface;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class Setting extends Model
{
    use HasFactory;

    /**
     * 不可以批量赋值的属性
     *
     * @var array
     */
    protected $guarded = [];

    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
    }

    // protected static function newFactory()
    // {
    //     return \Modules\DataAnalysis\Database\factories\SettingFactory::new();
    // }
}
